<template>
	<view>
		<NavbarHome />
		<view class="page_style">
			<GoodsList ref="goodsRef" />
		</view>
	</view>
</template>

<script setup lang="ts">
import NavbarHome from "@/components/navbar/NavbarHome.vue";
import GoodsList from "@/pages/home/components/GoodsList.vue";
import {
	onPageScroll,
	onPullDownRefresh,
	onReachBottom
} from '@dcloudio/uni-app';
import useAppStore from "@/store/app.ts"

const appStore = useAppStore()

const goodsRef = ref(null)
// 下拉刷新
onPullDownRefresh(() => {
	goodsRef.value.getList(true)
	setTimeout(function () {
		uni.stopPullDownRefresh();
	}, 800);
});
// 上拉加载更多
onReachBottom(() => {
	// 该事件必须申明,子组件才会触发该事件
})
onPageScroll(() => { });

</script>

<style scoped lang="scss">
.page_style{
	padding: 20rpx 20rpx 0;
}

</style>